<script type="text/javascript" src="/public/js/CheckForm.js"></script>
<script type="text/javascript" src="/public/js/ajax.js"></script>
<script type="text/javascript" src="/public/js/ajaxupload.3.5.js"></script>
<form id="addhousing" name="registration" action="/regist.html" method="POST" enctype="multipart/form-data" style="padding-top:20px;">
	<div>
		<fieldset>
			<legend>Реєстрація</legend>
			<div  class="wrapper">
                            <span>Імя<ins>*</ins>:</span>
                            <input type="text" name="name" id='fname' class="input" onblur="checkName();" required> <span id="chf1"></span>
			</div>
			<div  class="wrapper">
                            <span>Прізвище<ins>*</ins>:</span>
                            <input type="text" name="last_name" class="input" id="lname" onblur="checkLastName();" required> <span id="chf2"></span>
			</div>
                        <div  class="wrapper">
                            <span>Ваш E-mail<ins>*</ins>:</span>
                            <input type="email" name="email" class="input" id="email" onblur="checkEmail();" required> <span id="chf3"></span>
			</div>
                        <div  class="wrapper">
                            <span>Пароль<ins>*</ins>:</span>
                            <input type="password" name="password" class="input" id="pass1" onblur="checkPass1();" required> <span id="chf4"></span>
			</div>
                        <div  class="wrapper">
                            <span>Повторіть пароль<ins>*</ins>:</span>
                            <input type="password" name="password2" class="input" id="pass2" onblur="checkPass2();" required> <span id="chf5"></span>
			</div>
			<div  class="wrapper">
                            <span>Телефон<ins>*</ins>:</span>
                                (<input type="text" name="kod" class="input" id="ktel" placeholder="063" onblur="checkKod();" required size="3" style="width:20px;">)<input type="text" name="number" class="input" id="ftel" placeholder="1999756" onblur="checkTel();" style="width:50px;" required> <span id="chf6"></span>
                                <select name="type_phone" class="select" style="width:155px;">
                                    <option value='1'>Мобільний</option>"
                                    <option value='2'>Домашній</option>
                                </select>
                        </div>
                        <div  class="wrapper">
                            <span>Фото:</span>
                            <div id="status"><input name="uploadfile" id="upload" type="button" class="button" style="margin-left:100px;" value="Завантажити"/></div>
			</div>
                        <div  class="wrapper">
                            <span>Район:</span>
                            <select name="areas" class="select" style="margin-left:100px;">
                                <?php foreach ($this->items as $item):
                                	echo"<option value='".$item->getId()."'>".$item->getName()."</option>";
                                endforeach; ?>
                            </select>
			</div>
		</fieldset>
			<br><br>
			<span>&nbsp;</span>
			<a href="#" class="button" onClick="document.getElementById('addhousing').reset()">Очистити</a>
                        <input type="submit" value="Готово" id="submit" class="button" style="cursor:pointer;"/>
	</div>
</form>
<script type="text/javascript">
window.onload = function() {
	document.getElementById('submit').disabled = true;
	document.getElementById('submit').title='Заповнiть обовязковi поля';
        document.getElementById('submit').value='Помилка';
}
</script>